<?php
include "../lib/DAL/DmMonHoc.php";
class DmMonHocBLL{
    function __construct(){
        
    }
    
    function __destruct(){
        
    }
    
    function setDmMonHocBLL($row){
        $monhoc= new DmMonHoc();
        $monhoc->setDmMonHoc($row['madm_mh'],$row['ten_vt_mh'],$row['ten_mh']);
        return $monhoc;
         
    }
    
    public function getDmMonHoc($ma_monhoc){
        $sql = "select * from dm_monhoc where madm_mh ='".$ma_monhoc."'";        
        $row = mysql_fetch_array(mysql_query($sql));
       return $this->setDmMonHocBLL($row);
        
    }
    public function getListDmMonHoc(){
      $result = mysql_query("select * from dm_monhoc");
      $arr_monhoc= array();
      
      while($row = mysql_fetch_array($result)){
        $arr_monhoc[] =  $this->setDmMonHocBLL($row);
      }
      return $arr_monhoc;
    }
    
    
    
}

?>